package edu.hut.bookshop.pojo;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class Comment {

    private Long cId;//评论id
    private int jiajuId;//商品id
    private Long parentId;//父类评论id
    private int ptype;//父类评论的类型，可能是问题可能是评论
    private int userId;//用户id
    private String userName;//用户名


    //回复的评论
    private List<Comment> replyComments = new ArrayList<>();
    private Comment parentComment;
    private String parentNickname;




    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    private int count;//点赞数量
    private String comment;//评论内容
    private Date ccreateTime;//创建日期

    public Date getCcreateTime() {
        return ccreateTime;
    }

    public void setCcreateTime(Date ccreateTime) {
        this.ccreateTime = ccreateTime;
    }

    public Comment() {
    }

    @Override
    public String toString() {
        return "Comment{" +
                "cId=" + cId +
                ", jiajuId=" + jiajuId +
                ", parentId=" + parentId +
                ", ptype=" + ptype +
                ", userId=" + userId +
                ", userName='" + userName + '\'' +
                ", replyComments=" + replyComments +
                ", parentComment=" + parentComment +
                ", parentNickname='" + parentNickname + '\'' +
                ", count=" + count +
                ", comment='" + comment + '\'' +
                ", ccreateTime=" + ccreateTime +
                '}';
    }

    public List<Comment> getReplyComments() {
        return replyComments;
    }

    public void setReplyComments(List<Comment> replyComments) {
        this.replyComments = replyComments;
    }

    public Comment getParentComment() {
        return parentComment;
    }

    public void setParentComment(Comment parentComment) {
        this.parentComment = parentComment;
    }

    public String getParentNickname() {
        return parentNickname;
    }

    public void setParentNickname(String parentNickname) {
        this.parentNickname = parentNickname;
    }

    public Long getcId() {
        return cId;
    }

    public void setcId(Long cId) {
        this.cId = cId;
    }

    public int getJiajuId() {
        return jiajuId;
    }

    public void setJiajuId(int jiajuId) {
        this.jiajuId = jiajuId;
    }

    public Long getParentId() {
        return parentId;
    }

    public void setParentId(Long parentId) {
        this.parentId = parentId;
    }

    public int getPtype() {
        return ptype;
    }

    public void setPtype(int ptype) {
        this.ptype = ptype;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }
}
